var fs = require('fs')
fs.readFile('./test.txt', (err, data) => {
  if (err) {
    console.log(err)
  } else {
    console.log(data.toString())
    fs.writeFile('./write.txt', data, {encoding: 'utf-8'}, err => {
      if (err) {
        console.log(err)
        return false
      }
      console.log('write sucess')
    })
  }
})